package com.dongdongmovie.mapper;

import com.dongdongmovie.pojo.UserRole;
import com.dongdongmovie.pojo.UserRoleExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserRoleMapper {
    int countByExample(UserRoleExample example);

    int deleteByExample(UserRoleExample example);

    int insert(UserRole record);

    int insertSelective(UserRole record);

    List<UserRole> selectByExample(UserRoleExample example);

    int updateByExampleSelective(@Param("record") UserRole record, @Param("example") UserRoleExample example);

    int updateByExample(@Param("record") UserRole record, @Param("example") UserRoleExample example);

    //添加数据
    void add(@Param("depId") Integer depId,@Param("roleIds") Integer[] roleIds);

    //查询用户所处角色
    List<Integer> showroleids(@Param("userId") Integer userId);
}